package cn.sumpu.app.guoguojie.constant;

import java.util.HashMap;
import java.util.Map;

public enum Blood {
	A("01", "A"), B("02", "B"), O("03", "O"), AB("04", "AB"), OTHER(
			"05", "其他");
	private String value;
	private String label;
	
	private static Map<String,String> cache;
	
	static {
		cache = new HashMap<String,String>();
		cache.put(A.getValue(), A.getLabel());
		cache.put(B.getValue(), B.getLabel());
		cache.put(O.getValue(), O.getLabel());
		cache.put(AB.getValue(), AB.getLabel());
		cache.put(OTHER.getValue(), OTHER.getLabel());
	}

	private Blood(String value, String label) {
		this.value = value;
		this.label = label;
	}

	public String getValue() {
		return value;
	}

	public String getLabel() {
		return label;
	}
	
	public static String getLabelByValue(String value) {
		return cache.get(value);
	}
	
}
